from classfile.constant_info import ConstantInfo


class ConstantNameAndTypeInfo(ConstantInfo):
    def __init__(self):
        super().__init__()
        self.nameIndex = 0
        self.descIndex = 0

    def readInfo(self, clsReader):
        self.nameIndex = int.from_bytes(clsReader.readU16(), "big")
        self.descIndex = int.from_bytes(clsReader.readU16(), "big")
